package fr.cavalier.run;

import java.util.Random;

import fr.cavalier.sort.EfficientSort;
import fr.cavalier.sort.SimplesSort;

public class Main {

	public static void main(String[] args) {
		int[] array = generateRandomValue(20000);
		SimplesSort.insertionSort(array.clone());
		SimplesSort.selectionSort(array.clone());
//		SimplesSort.bubbleSort(arrayBis.clone());
		SimplesSort.bubbleSort2(array.clone());
		int[] mergeSortResult = EfficientSort.mergeSort(array.clone());
		SimplesSort.printArray(mergeSortResult);

	}

	public static int[] generateRandomValue(int nb){
		int [] tab = new int[nb];
		for(int i=0; i<tab.length; i++){
			tab[i] = (new Random().nextInt(100)+1);
		}
		return tab;
	}
}
